package demo1;
class Student implements Cloneable{
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
public class Test2 {
    public static void main(String[] args) {

        Student student = new Student();
        Student student1 = (Student) student.clone();

//        try {
//            Student student = new Student();
//            Student student1 = (Student) student.clone();
//            System.out.println("try内部的代码被执行了");
//        } catch (CloneNotSupportedException e) {
//            e.printStackTrace();
//            System.out.println("CloneNotSupportedException被捕获了");
//        }
        System.out.println("try-catch后面的代码被执行了");
    }
}
